//
// Created by Administrator on 2021/8/30.
//

#include "FileUtils.h"

void FileUtils::LoadFile(const char *path, char **data, size_t *size)
{
    std::ifstream ifs(path, std::ifstream::binary);
    ifs.seekg(0, std::ifstream::end);
    *size = static_cast<int>(ifs.tellg());
    ifs.seekg(0, std::ifstream::beg);
    *data = new char[*size];
    ifs.read(*data, *size);
}
